<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .container{
            display: grid;
            grid-template-columns: repeat(4,1fr);
            grid-gap: 10px;
            /* Firefox新版本有效*/
            grid-template-rows: masonry;
        }
        img{
            width: 100%;
            display: block;
        }
    </style>
</head>

<body>
    <div class="container"><img src="./images/1.jpeg" alt=""><img src="./images/2.jpeg" alt=""><img
            src="./images/3.jpeg" alt=""><img src="./images/4.jpeg" alt=""><img src="./images/5.jpeg" alt=""><img
            src="./images/6.jpeg" alt=""><img src="./images/7.jpeg" alt=""><img src="./images/8.jpeg" alt=""><img
            src="./images/9.jpeg" alt=""><img src="./images/10.jpeg" alt=""><img src="./images/11.jpeg" alt=""><img
            src="./images/12.jpeg" alt=""><img src="./images/13.jpeg" alt=""><img src="./images/14.jpeg" alt=""><img
            src="./images/15.jpeg" alt=""><img src="./images/16.jpeg" alt=""><img src="./images/17.jpeg" alt=""><img
            src="./images/18.jpeg" alt=""><img src="./images/19.jpeg" alt=""><img src="./images/20.jpeg" alt=""></div>
</body>

</html>